<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOtherAreasTable extends Migration
{
    /**
     * Run the migrations.
     * 项目其他区域管理
     *
     * @return void
     */
    public function up()
    {
        Schema::create('other_areas', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('区域名称')->nullable();
            $table->string('cname')->comment('别名')->nullable();
            $table->string('origin')->comment('起点')->nullable();
            $table->string('destination')->comment('终点')->nullable();
            $table->integer('level')->unsigned()->comment('养护等级')->nullable();
            $table->polygon('areas')->comment('区域经纬度')->nullable();
            $table->string('qy_areas',20)->comment('区域面积')->nullable();
            $table->string('girth',20)->comment('区域围长')->nullable();
            $table->integer('type')->unsigned()->comment('区域类型 0广场 1水域')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('other_areas');
    }
}
